1. Field of the Invention
The present invention relates to an image processing apparatus and an image processing method used in an image forming apparatus such as an MFP.
2. Description of the Related Art
Image processing apparatuses, which process image data, are conventionally provided in image forming apparatuses called MFPs, or Multi-Function Peripherals.
Such image processing apparatuses execute resolution conversion processing on image data and attribute data, thereby scaling (enlarging or reducing) that data, in order to adjust the image data and attribute data to the print size, resolution of the printer, and so on.
The nearest neighbor method, the bilinear method, and the bicubic method are known as examples of methods for executing scale processing on image data. The nearest neighbor method, also known as the nearest neighbor algorithm, uses the image data (luminance data) of a pre-scaling pixel nearest in distance to the pixel that is to be interpolated (a pixel of interest).
The bilinear and bicubic methods are linear interpolation methods, which interpolate image data having taken the pixels surrounding a pixel of interest into consideration.
While the nearest neighbor method can be applied to both binary image data and multivalued image data, the bilinear and bicubic methods cannot interpolate binary image data (that is, the meaning of the data is altered, and thus the methods cannot be applied).
Generally speaking, image data is multivalued data, and therefore the bicubic method, which can attractively interpolate the image data, is often used for scaling. However, attribute data is typically binary data, as illustrated in FIG. 5 and described later, and therefore the nearest neighbor method is used for the scaling thereof.
FIG. 7 illustrates resolution conversion processing that performs 4× enlargement on attribute data a0 and image data b0 using the nearest neighbor method. In this example, an image interpolation processing circuit 200 converts the resolution of the image data b0, resulting in image data b01, b02, b03, and b04. Meanwhile, the attribute data a0 is simply duplicated into four instances of attribute data a0.
FIG. 8 illustrates resolution conversion processing using the nearest neighbor method on a pixel-by-pixel basis, where the attribute data of pixels of interest P1, P2, P3, and P4 are taken as a0, a1, a2, and a3, respectively. As a result of this processing, the attribute data of the pixel P1, a pixel P11 adjacent to the pixel P1, a pixel P12 adjacent to the pixel P11, and a pixel P13 adjacent to the pixel P12 each take on attribute data a0; the attribute data of the pixel P2, a pixel P21 adjacent to the pixel P2, a pixel P22 adjacent to the pixel P21, and a pixel P23 adjacent to the pixel P22 each become attribute data a1; the attribute data of the pixel P3, a pixel P31 adjacent to the pixel P3, a pixel P32 adjacent to the pixel P31, and a pixel P33 adjacent to the pixel P32 each become attribute data a2; and the attribute data of the pixel P4, a pixel P41 adjacent to the pixel P4, a pixel P42 adjacent to the pixel P41, and a pixel P43 adjacent to the pixel P42 each take on attribute data a3. In this manner, attribute data ZD is simply duplicated when the resolution conversion processing is carried out.
Region determination processing, for determining which region each pixel of inputted image data belongs to, is typically carried out prior to the image data being outputted (see Patent Document 1, JP H11-213152A). According to the image processing apparatus disclosed in Patent Document 1, the absolute value of the difference in pixel values between a neighboring pixel and either an adjacent pixel, a neighboring pixel located at a predetermined distance from the pixel of interest within a predetermined range, or both is found. The attributes of the predetermined pixel are then identified based on that absolute value.
In addition, in order to obtain a high-quality image for reproduction, determining the image attributes of an image signal, generating an attribute determination signal that indicates the image attributes, and carrying out image processing using a signal in which the attribute determination signal is embedded into the image signal in a predetermined format are disclosed in Patent Document 2, JP 2004-228811A.
However, the following problems arise when resolution conversion processing is performed on attribute data using the nearest neighbor method.
Assuming that, as illustrated in FIG. 9, the image data (luminance data) of pixels P1 to P6, which are pixels of interest, is, in order, b0 (white data), b0, b1 (black data), b1, b0, and b0, the data becomes as follows when enlarged 4× through a predetermined resolution conversion processing (the bicubic method): the image data of pixels P1, P11, P12, and P13 becomes b0; the image data of pixels P2, P21, P22, and P23 becomes, in order, b0, b01, b02, and b03; the image data of pixels P3, P31, P32, and P33 becomes b1; the image data of pixels P4, P41, P42, and P43 becomes, in order, b1, b03, b02, and b01; the image data of pixels P5, P51, P52, and P53 becomes b0; and the image data of pixels P6, P61, P62, and P63 becomes b0.
The stated image data b0, b01, b02, b03, and b1 indicates a gradation, where the tone changes from white to black in that order. For example, the image data b01 is light gray data, the image data b02 is gray data, and the image data b03 is dark gray data.
As opposed to this, assuming that the attribute data of the pixels P1 to P6 is, in order, a0 (a white character), a0, a1 (a black character), a1, a0, and a0, the data becomes as follows when enlarged 4× through the nearest neighbor method: the attribute data of pixels P1, P1, P12, and P13 becomes a0; the attribute data of pixels P2, P21, P22, and P23 becomes a0; the attribute data of pixels P3, P31, P32, and P33 becomes a1; the attribute data of pixels P4, P41, P42, and P43 becomes a1; the attribute data of pixels P5, P51, P52, and P53 becomes a0; and the attribute data of pixels P6, P61, P62, and P63 becomes a0.
When image data is processed using a predetermined resolution conversion method and attribute data is processed using the nearest neighbor method in this manner, the colors indicated by the image data b01 (light gray data), b02 (gray data), and b03 (dark gray data) for the pixels P21, P22, and P23 are clearly different from the colors indicated by the attribute data a0 (white characters) of the same pixels. As a result, post-processing such as edge enhancement cannot be executed properly, which in turn leads to a degradation in image quality. This degradation is particularly apparent when compressing image data into a compact PDF format.
The methods disclosed in Patent Documents 1 and 2 do not carry out resolution conversion processing on image data and attribute data without causing a degradation in image quality.